.PHONY:all
all:tcpserver tcpclient

tcpserver:main.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp  -lpthread
tcpclient:TcpClient.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp  -lpthread

.PHONY:clean
clean:
	rm -f tcpserver tcpclient output output.tgz

.PHONY:output
output:
	@mkdir output
	@mkdir -p output/bin
	@mkdir -p output/conf
	@mkdir -p output/log
	@cp ServerNetCald output/bin
	@cp client_netcal output/bin
	@cp test.conf output/conf
	@cp install.sh output/
	@cp uninstall.sh output/
	@tar czf output.tgz output